package com.hspedu.mhl.utils;

import com.hspedu.mhl.dao.employDAO;
import com.hspedu.mhl.domain.employ;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * @author 吴宇~
 * @motto 我亦无他，唯手熟尔。
 * @edition jdk1.8
 * @reflection 0-1 喧闹任其喧闹，自由我自为之，我自风情万种，与世无争。
 * @date 2023/04/05/15:33
 */
public class test {
    public static void main(String[] args) throws SQLException {

        String empId = "";
        employDAO employDAO = new employDAO();
        String sql = "select empId from employ";
        List<employ> employs = employDAO.queryMulti(sql, employ.class);
        boolean bol = true;
        while (true) {
            empId = Random_.RandomInt(1781267163, 1781267166) + "";
            //不知道该怎么验证使账号不能重复
            int j = 0;
            for (employ employ : employs) {
                if (empId.equals(employ.getEmpId())) {
                    j++;
                }
            }
            if (j == 0) {
                break;
            }
        }
    }

}
